"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@angular/core");
var router_1 = require("@angular/router");
var admin_guard_service_1 = require("./lib/service/admin-guard.service");
var main_guard_service_1 = require("./lib/service/main-guard.service");
var member_guard_service_1 = require("./lib/service/member-guard.service");
var admin_component_1 = require("./admin/admin.component");
var main_component_1 = require("./main/main.component");
var member_component_1 = require("./member/member.component");
var index_component_1 = require("./home/index.component");
var tuike_guard_service_1 = require("./lib/service/tuike-guard.service");
var tuike_component_1 = require("./tuike/tuike.component");
var routes = [
    {
        path: '',
        redirectTo: '/home/index',
        pathMatch: 'full'
    },
    // 前台主路由
    {
        path: 'home',
        component: index_component_1.IndexComponent,
        children: [
            { path: '', loadChildren: 'app/home/index.module#IndexModule' }
        ]
    },
    // 会员普通界面主路由
    {
        path: 'main',
        component: main_component_1.MainComponent,
        canActivateChild: [main_guard_service_1.MainGuard],
        children: [
            { path: '', loadChildren: 'app/main/main.module#MainModule' }
        ]
    },
    {
        path: 'admin',
        component: admin_component_1.AdminComponent,
        canActivateChild: [admin_guard_service_1.AdminGuard],
        children: [
            { path: '', loadChildren: 'app/admin/admin.module#AdminModule' }
        ]
    },
    {
        path: 'tuike',
        component: tuike_component_1.TuikeComponent,
        canActivateChild: [tuike_guard_service_1.TuikeGuard],
        children: [
            { path: '', loadChildren: 'app/tuike/tuike.module#TuikeModule' }
        ]
    },
    {
        path: 'member',
        component: member_component_1.MemberComponent,
        canActivateChild: [member_guard_service_1.MemberGuard],
        children: [
            { path: '', loadChildren: 'app/member/member.module#MemberModule' }
        ]
    }
];
var AppRoutingModule = /** @class */ (function () {
    function AppRoutingModule() {
    }
    AppRoutingModule = __decorate([
        core_1.NgModule({
            imports: [
                router_1.RouterModule.forRoot(routes)
            ],
            exports: [
                router_1.RouterModule
            ],
        })
    ], AppRoutingModule);
    return AppRoutingModule;
}());
exports.AppRoutingModule = AppRoutingModule;
